﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Aliyun.MQS.SDK.Testing
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestCreateQueueAsync()
        {
            var client = new AliyunMQSClient("http://gyojigbxmg.mqs-cn-hangzhou.aliyuncs.com/MyFirstQueue1"
                , "9X5J5LIAKXSZkXtW"
                , "zTPfaY8mc4x5GZ1W1VhmXPzWCuO1Bb");
            var r = client.CreateQueueAsync(new CreatingQueueOption());
            r.Wait();
        }

        [TestMethod]
        public void TestSendMessageAsync()
        {
            var client = new AliyunMQSClient("http://gyojigbxmg.mqs-cn-hangzhou.aliyuncs.com/MyFirstQueue1"
                , "9X5J5LIAKXSZkXtW"
                , "zTPfaY8mc4x5GZ1W1VhmXPzWCuO1Bb");
            var r = client.SendMessageAsync(new SendMessageOption("你好！高鹏11"));
            r.Wait();
        }
    }
}
